import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

import { IDeliverOffer } from 'app/shared/model/deliver-offer.model';

@Component({
    selector: 'app-deliver-offer-detail',
    templateUrl: './deliver-offer-detail.component.html'
})
export class DeliverOfferDetailComponent implements OnInit {
    deliverOffer: IDeliverOffer;

    constructor(private activatedRoute: ActivatedRoute) {}

    ngOnInit() {
        this.activatedRoute.data.subscribe(({ deliverOffer }) => {
            this.deliverOffer = deliverOffer;
        });
    }

    previousState() {
        window.history.back();
    }
}
